const mongoose = require("mongoose")
const { Schema, model } = mongoose
const ShareSchema = new Schema({
    user_id: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'User',
        required: [true, "user_id 是必须的"]
    },
    content: {
        type: String,
    },
    dateTime: {
        type: String
    },
    music_id: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'Music',
    },
    news_id: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'News',
    },
})

const Share = model("Share", ShareSchema)
module.exports = Share